/**
 * 
 */
package com.tvshows.front.view.dialog;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

import com.tvshows.front.factory.TypeUI;
import com.tvshows.front.ui.dialog.DialogUI;

/**
 * @author tMidy
 * <p>
 * This class Shows Up a waiting dialog while reloading torrent files
 * </p>
 */
public class DialogErrorView
    extends Composite
    implements DialogUI
{

    /**
     * Constructor of the class
     **/
    public DialogErrorView( Composite parent, int style )
    {
        super( parent, style );
        this.getShell().setText( "Erreur..." );
    }

    /**
     * Sets the error message
     * @param message the error message
     */
    public void setErrorText( String message )
    {
        /*
      Error Label
     */
        Label labelErreur = new Label(this, 0);
        labelErreur.setText(message);
        this.layout();
    }

    /**
     * @see com.tvshows.front.ui.dialog.DialogUI#getType()
     */
    @Override
    public TypeUI getType()
    {
        return TypeUI.ERROR_VIEW;
    }

    @Override
    public void initFormData()
    {

    }

    @Override
    public void initComposites()
    {

    }

}
